Skip to content

Set the inference gateway Service to externalTrafficPolicy Cluster#320

Merged
negz merged 1 commit into
modelplaneai:mainfrom
pluna:serving-stack-gateway-traffic-policy
Jul 7, 2026
Merged

Set the inference gateway Service to externalTrafficPolicy Cluster#320
negz merged 1 commit into
modelplaneai:mainfrom
pluna:serving-stack-gateway-traffic-policy

Conversation

@pluna

@pluna pluna commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Description of your changes

Envoy Gateway defaults the managed LoadBalancer Service to externalTrafficPolicy: Local. Some clouds' load balancers reject that: on Nebius the Service emits SyncLoadBalancerFailed and never gets an external IP, so the gateway address stays pending, the ServingStack and InferenceCluster never reach Ready, and deployments targeting the cluster sit unscheduled. It was previously worked around by manually patching the Service after the fact.

This composes an EnvoyProxy that pins provider.kubernetes.envoyService.externalTrafficPolicy to Cluster and references it from the GatewayClass via parametersRef, the idiomatic Envoy Gateway way to configure the managed Service. Cluster is accepted by every cloud the provider runs on (GKE, EKS, Nebius), and the inference gateway does not need client source-IP preservation. The composed gateway-proxy resource is marked ready in mark_readiness alongside the other gateway resources so it does not hold the composite from Ready.

The change is composition-only with no cloud branching, so it behaves identically across clouds. I validated it live end to end on EKS (an L4 g6.xlarge cluster): the managed gateway Service came up with externalTrafficPolicy: Cluster and a real ELB address, the InferenceCluster reached Ready, and Qwen3-8B served completions through the gateway. The golden tests cover the composed EnvoyProxy, the GatewayClass parametersRef, and the readiness transition.

Fixes #316.

I have:

  • Read and followed Modelplane's contribution process.
  • Run nix flake check (or ./nix.sh flake check) and made sure it passes.
  • Added or updated tests covering any composition function changes.
  • Signed off every commit with git commit -s.

Envoy Gateway defaults the managed LoadBalancer Service to
externalTrafficPolicy: Local. Some clouds' load balancers reject that: on
Nebius the Service emits SyncLoadBalancerFailed and never gets an external
IP, so the gateway address stays pending, the ServingStack and
InferenceCluster never reach Ready, and deployments targeting the cluster
sit unscheduled. It was previously worked around by manually patching the
Service.

Compose an EnvoyProxy pinning envoyService.externalTrafficPolicy to Cluster
and reference it from the GatewayClass via parametersRef, the idiomatic
Envoy Gateway way to configure the managed Service. Mark the EnvoyProxy
Object ready alongside the other gateway resources so it does not hold the
composite from Ready. Cluster is accepted by every cloud the provider runs
on (GKE, EKS, Nebius) and the inference gateway does not need client
source-IP preservation. Updates the golden tests.

Fixes modelplaneai#316.

Signed-off-by: Pablo Luna <pablo@upbound.io>
@negz

negz commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Thanks @pluna this looks good to me.

@negz negz merged commit 040ee20 into modelplaneai:main Jul 7, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BYO InferenceCluster on Nebius never reaches Ready: gateway LoadBalancer Service uses externalTrafficPolicy: Local

2 participants